Skip to content

build: update mcp requirement from <2,>=1.27 to >=1.27,<3 in the python group - #33

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/uv/python-7c078ed1df
Closed

build: update mcp requirement from <2,>=1.27 to >=1.27,<3 in the python group#33
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/uv/python-7c078ed1df

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 7, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on mcp to permit the latest version.
Updates mcp to 2.1.1

Release notes

Sourced from mcp's releases.

v2.1.1

What's Changed

Full Changelog: modelcontextprotocol/python-sdk@v2.1.0...v2.1.1

Commits
  • 0921d94 Point imports of mcp.server.fastmcp at the migration guide (#3388)
  • 4d6f87e Build releases with the pinned hatchling and a publish action that accepts Me...
  • c5d7d0b docs: refresh translations for recent English changes (#3379)
  • d8b6383 Give recursive tool return types an object-rooted output schema (#3376)
  • 56af447 Log MCPServer handler exceptions by kind and keep crash details off the wire ...
  • f1c40b0 Accept boolean sub-schemas in 2025-11-25 tool schema properties (#3354)
  • 57394b0 Apply the request body limit to the SSE and OAuth endpoints (#3336)
  • 0cee624 Hand TypedDict tool results to pydantic natively (#3331)
  • 0d92192 Shorten stdio test comments (#3329)
  • b2025ab Acknowledge notification POSTs with 202 on the 2026-07-28 HTTP entry (#3326)
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

Updates the requirements on [mcp](https://github.com/modelcontextprotocol/python-sdk) to permit the latest version.

Updates `mcp` to 2.1.1
- [Release notes](https://github.com/modelcontextprotocol/python-sdk/releases)
- [Changelog](https://github.com/modelcontextprotocol/python-sdk/blob/main/RELEASE.md)
- [Commits](modelcontextprotocol/python-sdk@v1.27.0...v2.1.1)

---
updated-dependencies:
- dependency-name: mcp
  dependency-version: 2.1.1
  dependency-type: direct:production
  dependency-group: python
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Sep 7, 2026
@CameronBrooks11

Copy link
Copy Markdown
Member

The gate is right and this cannot merge as-is. Recording the diagnosis.

Widening to mcp<3 resolves mcp 2.x, where FastMCP was renamed to MCPServer. This repo already anticipated that:

ModuleNotFoundError: No module named 'mcp.server.fastmcp'.
This is mcp 2.x, where FastMCP was renamed to MCPServer ...

That message is deliberate — the repo raises it precisely so this failure names its own cause rather than surfacing as an opaque import error. So the guard worked exactly as designed, on the first real occasion it could.

Widening the range is therefore not a version bump but a migration: the MCP surface has to move to MCPServer first, and only then can the ceiling lift. That is real work with its own decision to record, not something to merge from a dependency PR.

Leaving open rather than closing: it is the tracking artifact for that migration until an issue supersedes it.

@CameronBrooks11

Copy link
Copy Markdown
Member

Correction to my earlier comment on this PR, and the real work is now tracked in #35.

I wrote that netspec "raises a deliberate error naming that migration, and it fired correctly on its first real occasion." That is wrong on both counts, and I established it by running the thing rather than reading it.

The except ImportError at mcp.py:212 is a guard for the mcp extra not being installed. ModuleNotFoundError is a subclass of ImportError, so under mcp 2.x it swallows a message that names the rename, the new import path and the migration guide, and replaces it with netspec-mcp needs the mcp extra — advice to install a package that is already installed. Measured on mcp 2.1.1 with this tree: exit 4, wrong reason.

What actually reports the truth is pyright in the Check job ("FastMCP" is unknown import symbol, lines 36 and 113), which only runs in CI.

#35 carries both halves: stop discarding the cause, which is worth doing whenever the migration happens, and the migration itself.

CameronBrooks11 added a commit that referenced this pull request Sep 12, 2026
Every test in this module called build_server().list_tools() in-process,
which exercises registration and not the protocol. A server that builds
its tools correctly and cannot answer `initialize` passed all of them.
That is not hypothetical: a corrupted copy of the mcp package produced
exactly that state during this port -- suite green, server unable to talk
to the SDK's own client -- and no test noticed. One now starts
netspec-mcp as a process and completes the handshake.

The budget assertion was a ceiling and a floor, and a payload that drops
only inputSchema measures ~713 tokens, which sits comfortably between
them. Reverting to a hand-built payload was green the same way. It now
asserts the measured bytes equal the serialised tool list, so the budget
cannot measure a subset of the wire and call it the wire.

D7 stated the mcp pin as >=1.27,<2, which this branch falsifies; it now
names D27 as superseding it in part, and D27 records the port -- why
>=1.27,<3 is wrong, and that list_tools being async and inputSchema
becoming input_schema cost more than the rename the release advertised.

The tool budget was published as ~834 tokens in the README and in
DECISIONS. It measures 999. The figure was stale across two changes to
what it measured, so both sites now name tool_schema_size() as the
source and state the ceiling rather than carrying a number by hand.

Refs #33
CameronBrooks11 added a commit that referenced this pull request Sep 12, 2026
… number

The budget figure was republished as "under 1,000 tokens" after ~834 went
stale. It measures 999, nothing asserts the bound, and four characters
added to one tool docstring makes it 1000 and both published sites
false with the suite green. D27 two entries below says the figure is
produced and never typed; the sentence contradicting it was mine.

Neither site now carries a number. Both name tool_schema_size() as the
source and the 3,000 ceiling CI actually asserts.

The handshake test had the protocol's own bytes in hand and only checked
for a key. Both sides of the budget's equality assertion are the same
model_dump, so a divergence between that rendering and what the server
sends would pass; the handshake now compares the budget's byte count
against what came back through the protocol. Length rather than the
string, because a JSON round-trip may reorder keys inside a schema
without changing what it costs.

The handshake test also skipped where the entry point is missing, which
is right for a contributor without the extra and wrong for CI -- the
same reasoning the module-level import already applies.

Refs #33
CameronBrooks11 added a commit that referenced this pull request Sep 12, 2026
approx_tokens is bytes // 4, so a measured 3,998 crosses 1,000 tokens at
4,000 and not at 4,002. The four came from 1000 - 999 = 1 token times
four bytes, which is the arithmetic that looks right rather than the one
that is -- substituted in the sentence arguing against substituting
plausible numbers for measured ones, under a subject line arguing
against it. Corrected to two, with the derivation written down.

"No number is written here" was also false of its own paragraph, which
carries four survey figures. Those are someone else's measurements and
do not move; what the entry means is no measured figure for netspec's
own surface, and it now says that.

Refs #33
@dependabot @github

dependabot Bot commented on behalf of github Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

This pull request was built based on a group rule. Closing it will not ignore any of these versions in future pull requests.

To ignore these dependencies, configure ignore rules in dependabot.yml

@dependabot
dependabot Bot deleted the dependabot/uv/python-7c078ed1df branch September 12, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant